<template>
  <div class="App">
    <h1 class="content">我是APP</h1>
    <p>当前用户的访问量：{{usersNum|spiltNumsComma}}</p>
    <!-- <p>价格1:{{price1|priceFormat|add$}}</p> -->
    <p>价格3:{{price3|priceFormat(3)|add$}}</p>
    <p>价格2:{{price2|priceFormat(4)|add$}}</p>
    <p>价格1:{{price1|priceFormat(5)|add$}}</p>
    <Count /> 
  </div>
</template>

<script>
import Count from '@/components/Count'

export default {
  name: 'App',
  components: {
    Count
  },
  data(){
    return {
      count: 0,
      usersNum:2993883998,
      price3:12.0,
      price2:14.33,
      price1:19.3
    }
  },
  filters:{
    spiltNumsComma(value) {
      const reg = /(\d)(?=(\d{3})+$)/g;
      return String(value).replace(reg,"$1,")
    }
  }
}
</script>

<style>

</style>
